#!/bin/bash
#pMusic - build gtkdialog xml code
#GPL - Copyright Sigmund Berglund

export TEXTDOMAIN=pmusic
export OUTPUT_CHARSET=UTF-8

GUI_BUTTON_BACK='
 <button name="highlight" tooltip-text=" '$(gettext 'Previous track')' ">
  <input file>'$APPDIR'/themes/'$THEME'/icon_previous.svg</input>
  <height>30</height>
  <action>'$APPDIR'/func_player -back -skip_update</action>
 </button>'
GUI_BUTTON_PLAY='
 <button name="highlight" tooltip-text=" '$(gettext 'Play')' / '$(gettext 'Pause')' ">
  <input file>'$WORKDIR'/icon_playpause.svg</input> ###this uses theme/icon_play and theme/icon_pause
  <height>35</height>
  <variable>BUTTON_PLAY</variable>
  <action>'$APPDIR'/func_player -play -skip_update; echo true > '$WORKDIR'/UPDATE_GUI</action>
  <action>refresh:BUTTON_PLAY</action>
 </button>'
GUI_BUTTON_NEXT='
 <button name="highlight" tooltip-text=" '$(gettext 'Next track')' ">
  <input file>'$APPDIR'/themes/'$THEME'/icon_next.svg</input>
  <height>30</height>
  <action>echo true > '$WORKDIR'/NO_RATING</action> ###avoid rating
  <action>'$APPDIR'/func_player -next -skip_update -user_action</action>
 </button>'

GUI_NAVIGATION='
 <hbox spacing="3">
  <vbox height-request="40" homogeneous="true">
   '$GUI_BUTTON_BACK'
  </vbox>
  <vbox height-request="45" homogeneous="true">
   '$GUI_BUTTON_PLAY'
  </vbox>
  <vbox height-request="40" homogeneous="true">
   '$GUI_BUTTON_NEXT'
  </vbox>
 </hbox>'
